package com.du.dumall.product.entity;

import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.io.Serializable;

import com.du.dumall.common.valid.AddGroups;
import com.du.dumall.common.valid.ListValue;
import com.du.dumall.common.valid.UpdateGroups;
import lombok.Data;

import javax.validation.constraints.*;

/**
 * 品牌
 * 
 * @author dupeng
 * @email 13576245006@163.com
 * @date 2021-12-20 17:10:04
 */
@Data
@TableName("pms_brand")
public class BrandEntity implements Serializable {
	private static final long serialVersionUID = 1L;

	/**
	 * 品牌id
	 */
	@NotNull(message = "修改必须为指定品牌id",groups = {UpdateGroups.class})
	@Null(message = "新增不定指定ID",groups = {AddGroups.class})
	@TableId
	private Long brandId;
	/**
	 * 品牌名
	 */
	private String name;
	/**
	 * 品牌logo地址
	 */
	private String logo;
	/**
	 * 介绍
	 */
	private String descript;
	/**
	 * 显示状态[0-不显示；1-显示]
	 */
	@ListValue(vlus = {0,1},groups = {AddGroups.class})
	private Integer showStatus;
	/**
	 * 检索首字母
	 */
	@NotBlank
	@Pattern(regexp = "^[a-zA-Z]$",message = "首字母必须是一个字母!")
	private String firstLetter;
	/**
	 * 排序
	 */
	@NotNull
	@Min(value = 0,message = "排序必须大于零")
	private Integer sort;

}
